package com.basic.technology.study.introduction.exception;

import org.junit.Test;

public class ExceptionTest {

    @Test
    public void a(){
        ExceptionTest t = new ExceptionTest();
        try {
            b();
        } catch (Exception e){
            System.out.println("ex - "+e);
        }
//        try {
//            new Thread( () -> {
//                c();
//            }).start();
//        } catch (Exception e){
//            System.out.println("111111");
//            e.printStackTrace();
//        }

    }

    public void b() throws ClassCastException{
        throw new NullPointerException("nononoo");
    }

    public void c(){
        throw new ArrayIndexOutOfBoundsException("dddddd");
    }
}
